using System.Threading.Tasks;
using CPlatePrintSys.Domain.Models;

namespace CPlatePrintSys.Infrastructure.Repositories
{
    public interface IPlateAnnotationInfoRepository : IRepository<PlateAnnotationInfo>
    {
        /// <summary>
        /// 按流用船号、Lot号、加工序列唯一标识查找
        /// </summary>
        Task<PlateAnnotationInfo> GetByUniqueKeyAsync(string streamShipNo, string lotNo, string sequence);

        /// <summary>
        /// 唯一性插入：如不存在则插入，存在则返回已存在项
        /// </summary>
        Task<PlateAnnotationInfo> AddIfNotExistsAsync(PlateAnnotationInfo entity);

        /// <summary>
        /// 批量更新母船号
        /// </summary>
        Task<int> UpdateMotherShipNoAsync(string oldMotherShipNo, string newMotherShipNo);

        /// <summary>
        /// 批量更新流用船号
        /// </summary>
        Task<int> UpdateStreamShipNoAsync(string oldStreamShipNo, string newStreamShipNo);

        /// <summary>
        /// 根据母船号删除相关标注信息
        /// </summary>
        Task<int> DeleteByMotherShipNoAsync(string motherShipNo);

        /// <summary>
        /// 根据流用船号删除相关标注信息
        /// </summary>
        Task<int> DeleteByStreamShipNoAsync(string streamShipNo);

        /// <summary>
        /// 更新标注图纸路径
        /// </summary>
        Task UpdateAnnotationDrawingPathAsync(int id, string annotationDrawingPath);
        // 可扩展特有方法
    }
} 